import numpy as np

arr = np.arange(12)
arr = arr.reshape(2, 3, 2)
print(arr)
print()
arr.resize(3, 4)
print(arr.T)

arr = np.arange(12)
arr.resize(3, 4)
print(np.vstack((arr, arr)))
print(np.hstack((arr, arr)))

arr2 = np.arange(8).reshape(2, 2, 2)
print(arr2)
print()
arr_random = np.random.randint(1, 6, 15)
print(np.log(arr_random))
print()
print(arr_random[arr_random > 2])
print()
print(arr_random.clip(2, 5))

